<template>
	<view class="pointsDetails">
		<view class="header">
			<view class="title">我的积分</view>
			<view class="points">15000</view>
		</view>
		<view class="pointsBg">
			<image src="/static/pointsBg.png"></image>
		</view>
		<view class="pointsContent">
			<view class="title">
				<text>积分明细</text>
			</view>
			<view class="list">
				<view class="item" v-for="item in pointsList" :key="item.id">
					<view>
						<text class="title">{{item.title}}</text>
						<text class="transactionValue">{{accDiv(item.transactionValue,100)}}</text>
					</view>
					<view>
						<text class="time">{{item.time}}</text>
						<text class="remainingValue">剩余积分：￥{{accDiv(item.remainingValue,100)}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import MyMinix from '@/utils/minix/minix.js';
	export default {
		mixins: [MyMinix],
		data() {
			return {
				pointsList: [{
					title: '余额支付订单',
					id: 1,
					time: '2024-10-21 12:24:21',
					remainingValue: 10000,
					transactionValue: 1000
				}]
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.pointsDetails {
		min-height: 100vh;
		background: linear-gradient(to bottom, #ec6025 6.52%, #fff 58.65%);

		.header {
			@include flexs(space-between, flex-start);
			flex-direction: column;
			color: #fff;
			padding: 30rpx 60rpx;

			.title {
				font-size: 32rpx;
				margin-bottom: 15rpx;
			}

			.points {
				font-size: 64rpx;
			}
		}

		.pointsBg {
			position: absolute;
			top: 10rpx;
			right: 30rpx;
			z-index: 1;
			display: inline-block;
			width: 260rpx;
			height: 260rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.pointsContent {
			position: relative;
			background: #fff;
			margin: 0 20rpx 20rpx;
			border-radius: 20rpx;
			box-shadow: 0 0 20rpx 0rpx rgba(0, 0, 0, .1);
			padding: 40rpx 30rpx 30rpx;
			z-index: 2;
			&>.title {
				font-size: 40rpx;
				font-weight: 600;
				color: #EB5B1E;
				text-align: center;

				text {
					display: inline-block;
					z-index: 10;
					position: relative;

					&::before,
					&::after {
						position: absolute;
						// display: inline-block;
						content: "";
						width: 60rpx;
						height: 50rpx;
						// background: linear-gradient(0deg, #000 -24%, #000 100%);
						background: linear-gradient(0deg, #ffa078 -24%, #d9d9d900 100%);
						z-index: -1;
					}

					&::before {
						border-radius: 25rpx 0px 0px 25rpx;
						left: -18rpx;
					}

					&::after {
						border-radius: 0 25rpx 25rpx 0;
						right: -18rpx;
					}
				}
			}
		}

		.list {
			// min-height: calc(100vh - 30rpx);
			padding: 30rpx 0 0;

			.item {
				// margin:0 0rpx 30rpx;
				padding: 20rpx;
				border-bottom: 1rpx solid #eee;

				&:last-child {
					border-bottom: 0;
				}

				// border-radius:20rpx;


				.title {
					font-size: 28rpx;
					font-weight: 600
				}

				.transactionValue {
					font-size: 32rpx;
					color: #EB5B1E;
					font-weight: 600
				}

				.remainingValue {
					font-weight: 600
				}

				&>view {
					@include flexs(space-between, center);

					&:first-child {
						padding-bottom: 30rpx;
					}

					&:last-child {
						font-size: 22rpx;
					}
				}
			}
		}
	}
</style>